package com.jie.creator.singleton.demo03;



/**
 * @description:测试类
 * @author: jie
 * @time: 2022/1/29 16:04
 */
public class Test {
    public static void main(String[] args) {
        //1、创建Singleton类的对象
        Singleton singleton = Singleton.getInstance();

        Singleton singleton1 = Singleton.getInstance();

        //判断两次获取到的Singleton对象是否是同一个对象
        System.out.println(singleton==singleton1);
    }
}
